<?php session_start();
//  Developed by Roshan Bhattarai 
//  Visit http://roshanbh.com.np for this script and more.
//  This notice MUST stay intact for legal use

// if session is not set redirect the user
if(empty($_SESSION['u_name']))
	header("Location:index.php");	

//if logout then destroy the session and redirect the user
if(isset($_GET['logout']))
{
	session_destroy();
	header("Location:index.php?logout=true");
}	
?>
<?php
$path = "http://".$_SERVER["HTTP_HOST"]."/gibbons";
?>
<?php
include 'includes/header.php';
?>
<table cellpadding="0" cellspacing="0" width="100%" border="0" >
<tr>
<td colspan="2">
<?php
$str = "<a href='home.php?logout' style='text-align:right;'><b>Logout<b></a>";
echo "<div align='right'>Welcome ".$_SESSION['name'].", ".$str."</div>";
?>
</td>
</tr>
<tr>
<td width="15%" valign="top">
<?php
include 'includes/menu.php';
?>
</td>

<td valign="top">
<div id="tabs">
<?php
/*if($_REQUEST["mode"]=="new-vehicle")
{
	include 'new-vehicle.php';
}
else */
if($_REQUEST["mode"]=="manage-vehicle")
{
	include 'manage-vehicle.php';
}
else
{
echo "<div class='home'>Welcome to your home page!</div>";
}
?>
<br /> <br /> <br /> <br />
</div>
</td>
</tr>
</table>
<?php
include 'includes/footer.php';
?>